package cn.edu.ren.controller;

import cn.edu.ren.feign.IStudentFeign;
import cn.edu.ren.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;

/**
 * @PackageName: cn.edu.ren.controller
 * @ClassName: FeignController
 * @Description:
 * @author: RZS
 * @date: 2021/6/18  22:21
 */
@RestController
@RequestMapping("/feign")
public class FeignController {

    @Autowired
    private IStudentFeign studentFeign;

    @GetMapping("/find_all")
    public Collection<Student> findAll(){
        return studentFeign.findAll();
    }

    @GetMapping("/index")
    public String index(){
        return studentFeign.index();
    }
}
